`
https://leetcode.cn/problems/successful-pairs-of-spells-and-potions/
`

/**
 * @param {number[]} spells
 * @param {number[]} potions
 * @param {number} success
 * @return {number[]}
 */
var successfulPairs = function (spells, potions, success) {
  // 对每个 spell 在 options 里进行一次二分即可
  potions.sort((a, b) => a - b)
  return spells.map((sp) => {
    const target = success / sp
    return potions.length - _.sortedIndex(potions, target)
  })
};